
//
//  ParameterStorage
//
//
//  Created by  on 2019/2/18.
//  Copyright © 2019 . All rights reserved.
//  ota 
#import "CAParameterStorage.h"

@implementation CAParameterStorage

static CAParameterStorage* sharedParameterStorage = nil;

+ (CAParameterStorage*) getInstance {
    if (sharedParameterStorage == nil) {
        sharedParameterStorage = [[CAParameterStorage alloc] init];
    }
    return sharedParameterStorage;
}

- (id) init {
    if (self = [super init]) {
        
        _memoryType = MEM_TYPE_SUOTA_SPI;
        _memoryBank = 0;
        _blockSize = 240;
        // sr09 芯片14531-01
        _spiMISOGPIO = P0_3;//0X03;
        _spiMOSIGPIO = P0_0;//0;
        _spiCSGPIO   = P0_1;//0X01;
        _spiSCKGPIO  = P0_4;//0X04;

        
    }
    return self;
}

-(void)setSr09Param {
    // sr09 芯片14531-01
    _spiMISOGPIO = P0_3;//0X03;
    _spiMOSIGPIO = P0_0;//0;
    _spiCSGPIO   = P0_1;//0X01;
    _spiSCKGPIO  = P0_4;//0X04;
}

-(void)setSr23Param {
    // sr23 芯片14592
    _spiMISOGPIO = P0_5;//0X05;
    _spiMOSIGPIO = P0_6;//0x06;
    _spiCSGPIO   = P0_3;//0X03;
    _spiSCKGPIO  = P0_0;//0X00;
}

@end
